<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page import="zhangcy.day0109.qingyoutravel.dao.TourRouteDao" %>
<%@ page import="zhangcy.day0109.qingyoutravel.dao.impl.TourRouteDaoImpl" %>
<%@ page import="java.util.List" %>
<%@ page import="zhangcy.day0109.qingyoutravel.po.TourRoute" %>
<%--
  Created by IntelliJ IDEA.
  User: 小香菜
  Date: 2023/1/9
  Time: 20:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <title>青游旅行社服务平台</title>
    <style>
        th {
            font-size: 23px;
        }

        td {
            font-size: 20px;
        }
    </style>
</head>
<body>
<div id="container">
    <header>
        <h1>青游旅行社服务平台</h1>
    </header>
    <div id="main_center">
        <form action="">
            <div id="addRoute">
                <a href="add-information.jsp"><input type="button" value="添加"></a>
            </div>
            <table>
                <thead>
                <tr>
                    <th>旅游线路名称</th>
                    <th>类型</th>
                    <th>价格(元)</th>
                    <th>咨询电话</th>
                    <th>咨询人</th>
                    <th>创建日期</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                    <c:forEach items="${tourRouteList}" var="tr" varStatus="vs">
                        <tr <c:if test="${vs.index % 2 == 0}">style="background-color: cyan" </c:if> >
                            <td>${tr.trName}</td>
                            <td>
                                <c:if test="${tr.trType eq 1}">自由行</c:if>
                                <c:if test="${tr.trType eq 2}">纯玩团</c:if>
                            </td>
                            <td>${tr.trPrice}</td>
                            <td>${tr.trPhone}</td>
                            <td>${tr.trUser}</td>
                            <td>${tr.createTime}</td>
                            <td>
                                <a href="">详情</a>&nbsp;&nbsp;&nbsp;
                                <a href="">删除</a>
                            </td>
                        </tr>
                    </c:forEach>
                </tbody>
            </table>
        </form>
    </div>
</div>
</body>
</html>
